#pragma warning disable 108
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using Cephei;
using Cephei.Generic;
using Cephei.QL.Times;
using Cephei.QL.Termstructures;
using Cephei.QL;
namespace Cephei.QL.Instruments
{
     // <summary> 
	// ! Derived classes must implement the virtual functions spotValue() (NPV or spot price) and spotIncome() associated with the specific relevant underlying (e.g. bond, stock, commodity, loan/deposit). These functions must be used to set the protected member variables underlyingSpotValue_ and underlyingIncome_ within performCalculations() in the derived class before the base-class implementation is called.  spotIncome() refers generically to the present value of coupons, dividends or storage costs.  discountCurve_ is the curve used to discount forward contract cash flows back to the evaluation day, as well as to obtain forward values for spot values/prices.  incomeDiscountCurve_, which for generality is not automatically set to the discountCurve_, is the curve used to discount future income/dividends/storage-costs etc back to the evaluation date.  \todo Add preconditions and tests  \warning This class still needs to be rigorously tested  \ingroup instruments
	// </summary>
    [Guid ("EB3FDFAF-AD10-49ed-BCB7-5D945EA990F8"),ComVisible(true)]
	public interface IForward : Cephei.QL.IInstrument
	{
		///////////////////////////////////////////////////////////////
        // Methods
        //
        
		 QL.Times.BusinessDayConventionEnum BusinessDayConvention {get;}
        
		 Cephei.QL.Times.ICalendar Calendar {get;}
        
		 Cephei.QL.Times.IDayCounter DayCounter {get;}
        
		 Cephei.QL.Termstructures.IYieldTermStructure DiscountCurve {get;}
        
		 Double ForwardValue {get;}
        
		 Cephei.QL.IInterestRate ImpliedYield(Double underlyingSpotValue, Double forwardValue, DateTime settlementDate, QL.CompoundingEnum compoundingConvention, Cephei.QL.Times.IDayCounter dayCounter);
        
		 Cephei.QL.Termstructures.IYieldTermStructure IncomeDiscountCurve {get;}
        
		 Boolean IsExpired {get;}
        
		 DateTime SettlementDate {get;}
        
		 Double SpotIncome(Cephei.QL.Termstructures.IYieldTermStructure incomeDiscountCurve);
        
		 Double SpotValue {get;}
    }

    // <summary> 
	// ! Derived classes must implement the virtual functions spotValue() (NPV or spot price) and spotIncome() associated with the specific relevant underlying (e.g. bond, stock, commodity, loan/deposit). These functions must be used to set the protected member variables underlyingSpotValue_ and underlyingIncome_ within performCalculations() in the derived class before the base-class implementation is called.  spotIncome() refers generically to the present value of coupons, dividends or storage costs.  discountCurve_ is the curve used to discount forward contract cash flows back to the evaluation day, as well as to obtain forward values for spot values/prices.  incomeDiscountCurve_, which for generality is not automatically set to the discountCurve_, is the curve used to discount future income/dividends/storage-costs etc back to the evaluation date.  \todo Add preconditions and tests  \warning This class still needs to be rigorously tested  \ingroup instruments Factory
	// </summary>
   	[ComVisible(true)]
    public interface IForward_Factory // : Collection_Factory<IForward, ICell<IForward>>
    {
        ///////////////////////////////////////////////////////////////
        // Factory methods
        //
    }
}

